﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using YiSha.Business.YiDongYuan;
using YiSha.Entity.YiDongYuan;
using YiSha.Model.Param;
using YiSha.Model.Param.OrganizationManage;
using YiSha.Model.Param.YiDongYuan;
using YiSha.Util.Model;
using YiSha.Util.Extension;

namespace YiSha.Admin.WebApi.Controllers
{
    [ApiController]
    public class insertopController : ControllerBase
    {
        private DetectionResultBLL drBLL = new DetectionResultBLL();

        #region 提交数据

        /// <summary>
        /// 保存尾气检测数据
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Route("insertop")]
        [HttpGet]
        public async Task<string> Index([FromQuery] DetectionResultEntity entity)
        {
            TData<string> obj = await drBLL.SaveForm(entity);
            if (obj.Tag == 1)
            {
                return "ACK";
            }
            else
            {
                return "NAK";
            }
        }

        #endregion 提交数据
    }
}